home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
mvpforth.arc
/
MVPFORTH.DOC
< prev
next >
Wrap
Text File
|
1986-04-20
|
4KB
|
58 lines
///////////////////////////////
Here is a summary of how to get started with the MVPFORTH
public domain program. Also, Mountain View Press offers the book
ALL ABOUT FORTH, by Glen Haydon.
With MVPFORTH.COM in the default drive, type MVPFORTH to load
the MVPFORTH operating system from DOS. Then typing VLIST will list
the available FORTH words ( FORTH-79 compatible ) and ad
the MVPFORTH operating system from DOS. Then typing VLIST will list
the available FORTH words ( FORTH-79 compatible ) and typing BYE
will return DOS.
If it is desired to have MVPFORTH loaded automatically upon
power-on, use the RENAME command in DOS to change the name of MVPFORTH.
COM to COMMAND.COM. In this case, the BYE word will be ineffective.
Examples of some of the more useful FORTH editing words:
100 LIST Lists block 100 and makes it the current screen
0 T Types Line 0 of current screen
P xxx Puts xxx as the current line
U xxx puts xxx as line Under current line
101 7 M Moves current line to under block 101 line 7
X deletes current line
F xxx Finds xxx in current line & makes it currnt cursr positn
3 S xxx Searches for xxx in 3 blks starting at curr blk
E after F, erases the string just found
D xxx Deletes the next occurrence of xxx in curr line
TILL xxx deletes all from curr cursor positn 'Til & including xxx
I xxx Inserts xxx beginning just before cursor
R xxx after F yyy, replaces yyy with xxx
Note: FORTH words are divided into "vocabularies", not all of which
are available at once. FORTH, EDITOR, and ASSEMBLER are words that
select the correponding vocab as the current vocab. You can define
your own vocabs by using the FORTH words VOCABULARY and DEFINITIONS.
Example:
VOCABULARY MATH
MATH DEFINITIONS
: SUM ( n1 n2 -> ) + . ;
FORTH
This creates a new vocab, MATH, containing the word SUM, and which
may be extended by entering more definitions while MATH is current.
Any existing vocab, say XXX, is made current just by typing its name.
Caution: The same word-name can be assigned totally different definitons
in different vocabs, and only the current vocab will be active.
A tip: When listing on the screen, e.g., XXX VLIST, hit any key to halt,
again to resume, and hold down to cancel.
Another caution: If line 0 of a block is all blanks, that block
will fail to load, but no message will be issued! It's a FORTH
convention to begin each block on line 0 (eg, with a comment).
/// Bob Sawyer ////////////////////////
//////////////////// Torrance, CA ///////